From: Vincent Untz Date: Thu, 30 Sep 2010 13:21:58 +0000 (+0200) Subject: gnome-shell.in: Never add empty elements to LD_LIBRARY_PATH X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9702 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c6eb2761c719af47248badb2187866ffaff6e671;p=gnome-shell.git gnome-shell.in: Never add empty elements to LD_LIBRARY_PATH An empty element means the current directory, and is insecure. https://bugzilla.gnome.org/show_bug.cgi?id=631004 --- diff --git a/src/gnome-shell.in b/src/gnome-shell.in index 163ecfc11..b523bde75 100755 --- a/src/gnome-shell.in +++ b/src/gnome-shell.in @@ -246,7 +246,11 @@ def start_shell(perf_output=None): if pkgconfig.returncode == 0: mozjs_libdir = re.sub('-(sdk|devel)', '', mozjs_sdkdir) if os.path.exists(mozjs_libdir + '/libmozjs.so'): - env['LD_LIBRARY_PATH'] = os.environ.get('LD_LIBRARY_PATH', '') + ':' + mozjs_libdir + if 'LD_LIBRARY_PATH' in env: + ld_library_path = env['LD_LIBRARY_PATH'] + ':' + mozjs_libdir + else: + ld_library_path = mozjs_libdir + env['LD_LIBRARY_PATH'] = ld_library_path # Log everything to stderr (make stderr our "log file") env['GJS_DEBUG_OUTPUT'] = 'stderr'